Skip to content

fix(unit-tests): consistently check all store types#92

Merged
janickm merged 1 commit intoNVIDIA:mainfrom
janickm:dev/janickm/push-xslwruvwuqvr
May 6, 2026
Merged

fix(unit-tests): consistently check all store types#92
janickm merged 1 commit intoNVIDIA:mainfrom
janickm:dev/janickm/push-xslwruvwuqvr

Conversation

@janickm
Copy link
Copy Markdown
Collaborator

@janickm janickm commented May 6, 2026

Also fix type errors from now validated function bodies


This pull request improves the test coverage and maintainability of the V4 data components by parameterizing tests to run against both "itar" and "directory" store types, and by modernizing random number generation for better reproducibility. The changes also remove redundant assertions in array equality checks, making the tests cleaner and easier to read.

Test parameterization and coverage improvements:

  • Converted several test classes (TestData4Reload, TestDataNewComponent, and TestPointCloudsSourceIntegration) to use @parameterized_class, ensuring all tests run for both "itar" and "directory" store types. This required changing test signatures and using self.store_type instead of a parameter. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

  • Added parameterized and parameterized_class dependencies to the Bazel test target and test files. [1] [2] [3]

Random data generation modernization:

  • Replaced usage of np.random.rand and np.random.randint with np.random.default_rng().random and np.random.default_rng().integers for all random data generation in tests, improving reproducibility and aligning with best practices. [1] [2] [3] [4] [5]

Test code simplification:

  • Removed redundant self.assertIsNone(...) wrappers around np.testing.assert_array_equal calls in multiple places, as the array equality assertion is sufficient on its own. [1] [2] [3]

Also fix type errors from now validated function bodies
@janickm janickm self-assigned this May 6, 2026
@janickm janickm enabled auto-merge (rebase) May 6, 2026 09:58
@janickm janickm merged commit 77144a9 into NVIDIA:main May 6, 2026
5 checks passed
@janickm janickm deleted the dev/janickm/push-xslwruvwuqvr branch May 6, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant